using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ModelTools._Iterator
{
    /// <summary>
    /// <para>For</para>
    /// <para>Iterates over a starting and ending value by a given value.</para>
    /// <para>按给定值循环访问起始值和结束值。</para>
    /// </summary>    
    [DisplayName("For")]
    public class IterateCount : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public IterateCount()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_from">
        /// <para>From Value</para>
        /// <para>The value used to start the iteration.</para>
        /// <para>用于开始迭代的值。</para>
        /// </param>
        /// <param name="_to">
        /// <para>To Value</para>
        /// <para>The value used to run the iteration.</para>
        /// <para>用于运行迭代的值。</para>
        /// </param>
        /// <param name="_increment">
        /// <para>By Value</para>
        /// <para>The value used to increment.</para>
        /// <para>用于递增的值。</para>
        /// </param>
        public IterateCount(long _from, long? _to, long _increment)
        {
            this._from = _from;
            this._to = _to;
            this._increment = _increment;
        }
        public override string ToolboxName => "Model Tools";

        public override string ToolName => "For";

        public override string CallName => "mb.IterateCount";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_from, _to, _increment, _value];

        /// <summary>
        /// <para>From Value</para>
        /// <para>The value used to start the iteration.</para>
        /// <para>用于开始迭代的值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("From Value")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long _from { get; set; }


        /// <summary>
        /// <para>To Value</para>
        /// <para>The value used to run the iteration.</para>
        /// <para>用于运行迭代的值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("To Value")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _to { get; set; }


        /// <summary>
        /// <para>By Value</para>
        /// <para>The value used to increment.</para>
        /// <para>用于递增的值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("By Value")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long _increment { get; set; }


        /// <summary>
        /// <para>Value</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Value")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _value { get; set; }


        public IterateCount SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}